home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 38 / Amiga Format CD38 (1999-03-15)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-04].iso / -seriously_amiga- / misc / ced_html / html / html_title.ced < prev   
Text File  |  1999-01-25  |  3KB  |  118 lines

  1. /*
  2. ** html_title.ced
  3. **
  4. ** $VER: html_title.ced 1.0 (12.02.1998)
  5. **
  6. ** Arexx script for HTML v3.2 title stucture
  7. **
  8. ** This script works with CygnusEd Professional v4.2
  9. **
  10. ** Copyright © Eric BELLE
  11. */
  12.  
  13. /*
  14. **------------------------------------------------------------------------------
  15. **    Initialisation
  16. **------------------------------------------------------------------------------
  17. */
  18.  
  19. OPTIONS RESULTS                            /* Tell CygnusEd to return results. */
  20. NL = '0A'X                                    /* Alias for new line. */
  21. KRETURN = RAWKEY 68                    /* Shortcut to the return key. */
  22. KTAB = RAWKEY 66                        /* Shortcut to the tab key. */
  23. STATUS TABSARESPACES                /* Return TAB mode ("tab" or "space"). */
  24. IF RESULT = 1                                /* Test the TAB mode. */
  25. THEN "TABS = SPACES"                /* Switch TAB mode from "space" to "tab". */
  26. ELSE NOP                                        /* No operation. */
  27. TAB SIZE 1                                    /* Set TAB size proportional to 2 spaces. */
  28.  
  29. /*
  30. **------------------------------------------------------------------------------
  31. **    Title font selection
  32. **------------------------------------------------------------------------------
  33. */
  34.  
  35. GETNUMBER 1 '"Title font size?"' 1 6
  36. TitleNumber = RESULT
  37.  
  38. IF (TitleNumber=" ")
  39. THEN EXIT 0
  40. ELSE NOP
  41.  
  42. /*
  43. **------------------------------------------------------------------------------
  44. **    Title position
  45. **------------------------------------------------------------------------------
  46. */
  47.  
  48. TitlePositionMode = "q"
  49. DO WHILE ~(TitlePositionMode="l" | TitlePositionMode="c",
  50.                     | TitlePositionMode="r",
  51.                     | TitlePositionMode=" " | TitlePositionMode="RESULT")
  52.     GETSTRING "c" '"Title position: (l)eft, (c)enter, (r)ight ?"'
  53.     TitlePositionMode = RESULT
  54. END
  55.  
  56. IF (TitlePositionMode="RESULT" | TitlePositionMode=" ")
  57. THEN EXIT 0
  58. ELSE NOP
  59.  
  60. /*
  61. **------------------------------------------------------------------------------
  62. **    Html title marks
  63. **------------------------------------------------------------------------------
  64. */
  65.  
  66. SELECT
  67.     WHEN (TitleNumber=1) THEN DO
  68.         OpenTitle = "<H1"
  69.         CloseTitle = "</H1>"
  70.         END
  71.     WHEN (TitleNumber=2) THEN DO
  72.         OpenTitle = "<H2"
  73.         CloseTitle = "</H2>"
  74.         END
  75.     WHEN (TitleNumber=3) THEN DO
  76.         OpenTitle = "<H3"
  77.         CloseTitle = "</H3>"
  78.         END
  79.     WHEN (TitleNumber=4) THEN DO
  80.         OpenTitle = "<H4"
  81.         CloseTitle = "</H4>"
  82.         END
  83.     WHEN (TitleNumber=5) THEN DO
  84.         OpenTitle = "<H5"
  85.         CloseTitle = "</H5>"
  86.         END
  87.     WHEN (TitleNumber=6) THEN DO
  88.         OpenTitle = "<H6"
  89.         CloseTitle = "</H6>"
  90.         END
  91.     OTHERWISE NOP
  92. END
  93.  
  94. SELECT
  95.     WHEN (TitlePositionMode="c") THEN TitlePosition = " ALIGN=CENTER>"
  96.     WHEN (TitlePositionMode="r") THEN TitlePosition = " ALIGN=RIGHT>"
  97.     WHEN (TitlePositionMode="l") THEN TitlePosition = " ALIGN=LEFT>"
  98.     OTHERWISE NOP
  99. END
  100.  
  101. /*
  102. **------------------------------------------------------------------------------
  103. **    Html title structure
  104. **------------------------------------------------------------------------------
  105. */
  106.  
  107. TEXT OpenTitle || TitlePosition ; "AUTO-INDENT" ; KTAB
  108. TEXT "Should be modified - Title" ; "AUTO-INDENT" ; BACKTAB
  109. TEXT CloseTitle
  110.  
  111. /*
  112. **------------------------------------------------------------------------------
  113. **    End of html_title.ced Arexx script
  114. **------------------------------------------------------------------------------
  115. */
  116.  
  117. EXIT 0
  118.